package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品对象 super_product
 * 
 * @author xjf
 * @date 2025-08-13
 */
public class SuperProduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品id */
    @Excel(name = "商品id")
    private Long id;

    /** 分类id */
    @Excel(name = "分类id")
    private Long categoryId;

    private Long fatherCategoryId;


    /** 商品名称 */
    @Excel(name = "商品名称")
    private String name;

    /** 副标题 */
    @Excel(name = "副标题")
    private String subtitle;

    /** 主图URL */
    @Excel(name = "主图URL")
    private String mainImage;

    /** 价格 */
    @Excel(name = "价格")
    private BigDecimal price;

    /** 库存数量 */
    @Excel(name = "库存数量")
    private Long stock;

    /** 商品已售 */
    @Excel(name = "商品已售")
    private Long count;

    /** 商品状态 0下架 1上架 */
    @Excel(name = "商品状态 0下架 1上架")
    private Long status;

    /** 是否删除 0正常 1删除 */
    private Long del;

    // 关联的分类信息
    private SuperCategory category;

    // 关联的父级分类信息
    private SuperCategory parentCategory;

    // 关联的商品详情
    private SuperProductDetail productDetail;

    // 关联的商品图片列表（一对多关系）
    private List<SuperProductImage> productImages;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getFatherCategoryId() {
        return fatherCategoryId;
    }

    public void setFatherCategoryId(Long fatherCategoryId) {
        this.fatherCategoryId = fatherCategoryId;
    }

    public Long getId()
    {
        return id;
    }

    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setSubtitle(String subtitle) 
    {
        this.subtitle = subtitle;
    }

    public String getSubtitle() 
    {
        return subtitle;
    }

    public void setMainImage(String mainImage) 
    {
        this.mainImage = mainImage;
    }

    public String getMainImage() 
    {
        return mainImage;
    }

    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    public void setStock(Long stock) 
    {
        this.stock = stock;
    }

    public Long getStock() 
    {
        return stock;
    }

    public void setCount(Long count) 
    {
        this.count = count;
    }

    public Long getCount() 
    {
        return count;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setDel(Long del) 
    {
        this.del = del;
    }

    public Long getDel() 
    {
        return del;
    }

    // 关联对象的getter和setter方法
    public SuperCategory getCategory() {
        return category;
    }

    public void setCategory(SuperCategory category) {
        this.category = category;
    }

    public SuperCategory getParentCategory() {
        return parentCategory;
    }

    public void setParentCategory(SuperCategory parentCategory) {
        this.parentCategory = parentCategory;
    }

    public SuperProductDetail getProductDetail() {
        return productDetail;
    }

    public void setProductDetail(SuperProductDetail productDetail) {
        this.productDetail = productDetail;
    }

    public List<SuperProductImage> getProductImages() {
        return productImages;
    }

    public void setProductImages(List<SuperProductImage> productImages) {
        this.productImages = productImages;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("categoryId", getCategoryId())
                .append("name", getName())
                .append("subtitle", getSubtitle())
                .append("mainImage", getMainImage())
                .append("price", getPrice())
                .append("stock", getStock())
                .append("count", getCount())
                .append("status", getStatus())
                .append("del", getDel())
                .append("category", getCategory())
                .append("parentCategory", getParentCategory())
                .append("productDetail", getProductDetail())
                .append("productImages", getProductImages())
                .toString();
    }
}
